package com.istock.http;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.istock.base.common.api.model.ApiBaseResponse;

@Controller
@RequestMapping("httpTest")
public class HttpServiceTestController {

	@Autowired
	private HttpMock httpMock;
	
	@ResponseBody
	@RequestMapping("test1")
	public ApiBaseResponse<String> test1(String requestId){
		return httpMock.test1(requestId);
	}
	
	@ResponseBody
	@RequestMapping("test2")
	public ApiBaseResponse<String> test2(ModelTest model , MdoelMock mock){
		return httpMock.test2(model, mock);
	}
	
	@ResponseBody
	@RequestMapping("test3")
	public ApiBaseResponse<String> test3(@RequestBody Map<String , Object> paramMap){
		return httpMock.test3(paramMap);
	}
	
	@ResponseBody
	@RequestMapping("test4")
	public ApiBaseResponse<String> test4(@RequestBody List<ModelTest> modelList){
		return httpMock.test4(modelList);
	}
	
	@ResponseBody
	@RequestMapping("test5")
	public ApiBaseResponse<String> test5(Integer[] numberList){
		return httpMock.test5(numberList);
	}
}
